<template>
    <div>
        <h1>账号管理显示界面</h1>
        <table class="table">
            <thead>
                <tr>
                    <td>编号</td>
                    <td>账号</td>
                    <td>密码</td>
                    <td>姓名</td>
                    <td>手机号</td>
                    <td>角色</td>
                    <td>创始人</td>
                </tr>
            </thead>
            <tbody>
                <tr v-for="a in data">
                    <td>{{a.id}}</td>
                    <td>{{a.name}}</td>
                    <td>****</td>
                    <td>{{a.memberName}}</td>
                    <td>{{a.phone.substring(0,3)+"****"+a.phone.substring(7,11)}}</td>
                    <td>{{a.memberType}}</td>
                    <td>{{a.people}}</td>
                </tr>
            </tbody>
        </table>
    </div>
</template>

<script setup lang="ts">
import axios from 'axios';
import { ref } from 'vue';
import { onMounted } from 'vue';

onMounted(()=>{
    Show()
})

const data=ref([{
    "id": 0,
    "name": "admin",
    "password": "1234",
    "memberName": "张三",
    "phone": "18298977638",
    "memberType": "机构管理员",
    "people": "孙悟空"
}])

const Show=()=>{
    axios.get("https://localhost:7067/api/Member/GetAllO").then(res=>{
        data.value=res.data;
    })
}


</script>

<style scoped>

</style>